﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Account.aspx.cs" Inherits="StreetSmartAdmin.Account" %>
<%@ Register TagPrefix="CustUserCtrl" TagName="Header" Src="Header.ascx" %>
<%@ Register TagPrefix="CustUserCtrl" TagName="Footer" Src="Footer.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body>
    <form id="form1" runat="server">
<CustUserCtrl:Header id="Header" runat="server"></CustUserCtrl:Header>
<center><h1>Account Management</h1></center>
    <div>
    
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString='<%$ ConnectionStrings:SQLServer2005DBConnectionString %>'
                    SelectCommand="Select * FROM Users"
                    DeleteCommand = "DELETE from Users where UserID=@UserID"
                    UpdateCommand = "UPDATE Users SET UserName=@UserName,Password=@Password where UserID=@UserID">
                    </asp:SqlDataSource>

                    <asp:MultiView ID="MultiView1" runat="server">
                    <asp:View ID="View0" runat="server">
                        <center>
                        <asp:Label ID="Label3" runat="server" Text="Admin UserName: "></asp:Label>
                        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br/><br/>
                        <asp:Label ID="Label4" runat="server" Text="Admin Password: "></asp:Label>
                        <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox><br/><br/>
                        <asp:Button ID="Button2" runat="server" Text="Admin" onclick="Button2_Click" />
                        </center>
                    </asp:View>
                        <asp:View ID="View1" runat="server">
                         <asp:GridView ID="GridView1" runat="server" CssClass="mGrid"
            PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt" 
            DataSourceID="SqlDataSource1" DataKeyNames="UserID"
            AllowPaging="True" AutoGenerateColumns="True"
            EnableModelValidation="True" PageSize="20" AllowSorting="True">
                             <AlternatingRowStyle CssClass="alt" />
                             <Columns>
                                 <asp:CommandField ButtonType="Button" ShowDeleteButton="True" 
                                     ShowEditButton="True" />
                             </Columns>
                             <PagerStyle CssClass="pgr" />
                            </asp:GridView>
                            <asp:Label ID="Label1" runat="server" Text="Username: "></asp:Label>
                        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        <br/><br/>
                            <asp:Label ID="Label2" runat="server" Text="Password: "></asp:Label>
                        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                        <br/><br/>
                        <asp:Button ID="Button1" runat="server" Text="Add" onclick="Button1_Click" />
                        </asp:View>
                    </asp:MultiView>
    
           

           

           

           

            

            
    </div>
    </form>
</body>
</html>
